package com.netx.cubigraf.shared;
import java.util.Properties;
import com.netx.generics.basic.IntegrityException;


public class ApplicationProps {

	private static Properties _props;
	
	static {
		// This was the old way, now we use an environment variable.
		//_props.load(ApplicationProps.class.getResourceAsStream("application.properties"));
		_props = new Properties();
		String eapHome = System.getenv("EAP_HOME");
		if(eapHome == null) {
			throw new IntegrityException("Environment variable EAP_HOME has not been set.");
		}
		_props.put("eap_home", eapHome);
	}
	
	public static String getEapHome() {
		return _props.getProperty("eap_home");
	}
}
